
/* set working directory*/ 

cd ""  /*  /replication_files/Country_Year_V-Dem_Full+others_STATA_v12 */

use "V-Dem-CY-Full+Others-v12.dta", clear



keep if year>2015
tsset country_id year
replace v2elloeldm=l.v2elloeldm if year==2021 & l.v2elloeldm<. & v2elloeldm==.
replace v2elloeldm=l2.v2elloeldm if year==2021 & l2.v2elloeldm<. & v2elloeldm==.
replace v2elloeldm=l3.v2elloeldm if year==2021 & l3.v2elloeldm<. & v2elloeldm==.
replace v2elloeldm=l4.v2elloeldm if year==2021 & l4.v2elloeldm<. & v2elloeldm==.
replace v2elloeldm=l5.v2elloeldm if year==2021 & l5.v2elloeldm<. & v2elloeldm==.

replace v2elmulpar_ord=l.v2elmulpar_ord if year==2021 & l.v2elmulpar_ord<. & v2elmulpar_ord==.
replace v2elmulpar_ord=l2.v2elmulpar_ord if year==2021 & l2.v2elmulpar_ord<. & v2elmulpar_ord==.
replace v2elmulpar_ord=l3.v2elmulpar_ord if year==2021 & l3.v2elmulpar_ord<. & v2elmulpar_ord==.
replace v2elmulpar_ord=l4.v2elmulpar_ord if year==2021 & l4.v2elmulpar_ord<. & v2elmulpar_ord==.
replace v2elmulpar_ord=l5.v2elmulpar_ord if year==2021 & l5.v2elmulpar_ord<. & v2elmulpar_ord==.

gen label="Malawi" if country_name=="Malawi"


scatter v2lgfemleg v2xnp_client if v2elloeldm<1.5 & v2psprlnks_ord<4 & year==2021 & v2elmulpar_ord>2, scheme(s1mono) mlabel(label) xtitle("Clientelism Index") ytitle("% Women in Parliament") yline(19.47763) xline(.5548947)
